﻿@model KKU.RBSFPP.Shared.DAC.Product

@{
    ViewBag.Title = "Create";
}

@Html.Partial("_AccountManagement")

<h3><span class="label label-success"><span class="glyphicon glyphicon-plus"></span> เพิ่มของเก่า</span></h3>


@using (Html.BeginForm()) {
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)

    <fieldset>
        <legend></legend>

         <h4>ชื่อของเก่า</h4>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.Name, new { @class="form-control" ,placeholder="ชื่อของเก่า"})
            @Html.ValidationMessageFor(model => model.Name)
        </div>


         <div class="editor-label">
            @Html.LabelFor(model => model.CategoryId, "ประเภท")
        </div>

        <div class="editor-field">
            @Html.DropDownList("CategoryId", String.Empty)
            @Html.ValidationMessageFor(model => model.CategoryId)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.ProductUnitId, "หน่วย")
        </div>
        <div class="editor-field">
            @Html.DropDownList("ProductUnitId", String.Empty)
            @Html.ValidationMessageFor(model => model.ProductUnitId)
        </div>

        <h5>ราคาซื้อ(บาท)</h5>
        <div class="editor-field">
            @Html.TextBox("buyInput", "0", new { @class = "form-control", placeholder = "ราคาซื้อ" })
            @Html.ValidationMessage("buyInput")
        </div>
         <h5>ราคาขาย(บาท)</h5>
        <div class="editor-field">
            @Html.TextBox("sellInput", "0", new { @class = "form-control", placeholder = "ราคาขาย" })
            @Html.ValidationMessage("sellInput")
        </div>

         <legend> </legend>

        <p>
            <a href=@Url.Action("Index", "Product") class="btn btn-danger"><span class="glyphicon glyphicon-remove-circle"></span> ยกเลิก</a>
            <button type="submit" class="btn btn-success"><span class="glyphicon glyphicon-ok-circle"></span> ตกลง</button>
        </p>

    </fieldset>
}


@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
